package day03;

import java.security.AlgorithmParameterGenerator;

//运算符的演示
public class OperDemo {
    public static void main(String[] args) {

        int num =0;
        int flag =num>0?1:-1;
        System.out.println(flag);

        int a =8,b=55;
        int min =a<b?a:b;
        System.out.println("最小的值为"+min);

        /*
        int age=39;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我今年"+age+"岁了");

        String name ="ABC";
        System.out.println("大家好，我叫"+name);
        System.out.println("大家好，我叫"+name+",今年"+age+"岁了");


        */

        /*
        short s =5;
        //s=s+10;//编译错误，需要强转
        s+= 10;//相当于s=（short）（s+10）；
*/

        /*
        int a =5;
        a +=10;//相当于a=（int）（a+10）
        System.out.println(a);//15
        a *=2;//相当于a=（int）（a*2）
        System.out.println(a);//30
        a  /=6;//相当于a=（int）（a/6）
        System.out.println(a);//5

 */

        /*
        int a =5,b=10,c=5;
        System.out.println(b>=a||b<c);//  T||F=T
        System.out.println(b<=c||b>a);//  F||T=T
        System.out.println(b!=c||b>a);//  T||T=T
        System.out.println(a==b||b<a);//  F||F=F
        int score =90;
        System.out.println(score<0||score>100);

        boolean b2 =!(a>b);
        System.out.println(b2);//!T=F
        System.out.println(!(a>b));//!F=T


 */

        /*
        int a=5,b=10,c=5;
        boolean b1=b>=a&& b<c;
        System.out.println(b1);
        System.out.println(b<=c&&b>a);
        System.out.println(a==b&&b<a);
        System.out.println(b!=c&&b>a);


 */
        /*
        int a =5,b=10,c=5;
        boolean b1=a>b;
        System.out.println(b1);//false
        System.out.println(c<b);//true
        System.out.println(a>=c);//true
        System.out.println(a<=b);//true
        System.out.println(a==c);//true
        System.out.println(a!=c);//false

        System.out.println(a%2==0);//false
        System.out.println(a+c>b);//false
        System.out.println(a++>5);//false------a自增一变为6
        System.out.println(a++>5);//true-------a自增一变为7
        System.out.println(a);//7

 */

        /*
        int a=5;
        int b=5;
        a++;++b;//相当于a=a+1，b=b+1
        System.out.println(a);//6
        System.out.println(b);//6

        int c=a++;
        int d=++b;
        System.out.println(a);//7
        System.out.println(b);//7
        System.out.println(c);//6
        System.out.println(d);//7

        int e=a--;
        int f=--b;
        System.out.println(a);//6
        System.out.println(b);//6
        System.out.println(e);//7
        System.out.println(f);//6

 */
    }
}
